package ren.colorful.thread;

public class Task1 implements Runnable{
	
	public static ThreadLocal<Integer> seq = new ThreadLocal<Integer>(){
		public Integer initialValue(){
			return 0;
		}
	};
	
	public static Integer increGet(){
		seq.set(seq.get() + 1);
		return seq.get();
	}
	
	@Override
	public void run() {
		for(int i = 0; i< 4; i++){
			System.out.println("ThreadName : "+ Thread.currentThread().getName() + " : " + increGet());
		}
	}

}
